package Test_0715;

/**
 * Created with Intellij IDEA
 * Description:
 * User: 星辰
 * Dare: 2024-07-15
 * Time: 6:04
 */
class Date{
    public int year;
    public int month;
    public int day;
    public Date(){
        System.out.println("没有参数");

    }
    public Date(int year, int month, int day){
        this.year=year;
        this.month=month;
        this.day=day;
        System.out.println("调用三个参数");
    }
    public void setDate(int year, int month, int day){
        this.year=year;
        this.month=month;
        this.day=day;
    }
    public void printDate(){
        System.out.println(this.year+"."+this.month+"."+this.day);
    }
}
public class Test_0715 {
    public static void main1(String[] args) {
        int a=1;
        System.out.println(a);
    }
    public static void main(String[] args) {
        Date d1=new Date();
        d1.setDate(2024,4,7);
        d1.printDate();
    }
}
